from django.db import models
from django.contrib.auth.models import AbstractUser


# Create your models here.
class MyUser(AbstractUser):
    # 删除字段  这里是不想要的字段，直接赋值为None即可
    first_name = None
    last_name = None


    # 添加字段
    nickname = models.CharField(max_length=30, null=True, blank=True, verbose_name="姓名")
    # mobile = models.CharField(null=True, blank=True, max_length=11, verbose_name="电话")
    # creator = models.CharField('创建人', max_length=200,null=True)
    # modifier = models.CharField('修改人', max_length=200, null=True )
    # create_time = models.DateTimeField('创建时间',auto_now=datetime.datetime.now(), null=True)
    # modify_time = models.DateTimeField('修改时间',auto_now=datetime.datetime.now(),null=True )
    class Meta:
        verbose_name = "用户信息"
        verbose_name_plural = verbose_name
    def __str__(self):
        return self.username
